/*
 * @Author: lg9527 13691080728@126.com
 * @Date: 2024-02-19 11:18:38
 * @LastEditors: lg9527 13691080728@126.com
 * @LastEditTime: 2024-04-24 14:02:54
 * @FilePath: \cmjyxpcfront\src\router\routes\modules\dashboard.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const dashboard: AppRouteModule = {
  path: '/dashboard',
  name: 'Dashboard',
  component: LAYOUT,
  redirect: '/dashboard/workbench',
  meta: {
    orderNo: 10,
    icon: 'ion:grid-outline',
    title: t('routes.dashboard.dashboard'),
    roles: [
      'Admin',
      'City',
      'Area',
      'UnitAdmin',
      'CityUnitAdmin',
      'Street',
      'Community',
      'Investigator',
    ],
    userGroups: ['Admin', 'FireControl', 'Housing', 'Police'],
    hideChildrenInMenu: true,
  },
  children: [
    // {
    //   path: 'statistics',
    //   name: 'Statistics',
    //   component: () => import('/@/views/dashboard/analysis/index.vue'),
    //   meta: {
    //     // affix: true,
    //     title: t('routes.dashboard.analysis'),
    //   },
    // },
    {
      path: 'workbench',
      name: 'Workbench',
      // component: () => import('/@/views/dashboard/workbench/indexless.vue'),
      component: () => import('/@/views/houseStat/index.vue'),
      meta: {
        roles: [
          'Admin',
          'City',
          'Area',
          'UnitAdmin',
          'CityUnitAdmin',
          'Street',
          'Community',
          'Investigator',
        ],
        userGroups: ['Admin', 'FireControl', 'Housing', 'Police'],
        title: t('routes.dashboard.workbench'),
      },
    },
  ],
};

export default dashboard;
